//
//  SDPhotoArray.m
//  SKinDiary
//
//  Created by 廖海 on 2017/4/25.
//  Copyright © 2017年 tencent. All rights reserved.
//

#import "SDPhotoArray.h"

@interface SDPhotoArray () {
    NSMutableArray *_photoInfoArray;
    NSMutableArray *_photoImageArray;
}
@end

@implementation SDPhotoArray
@synthesize photoInfoArray = _photoInfoArray;
@synthesize photoImageArray = _photoImageArray;

- (instancetype)init
{
    self = [super init];
    if (self) {
        _photoInfoArray = [[NSMutableArray alloc] init];
        _photoImageArray = [[NSMutableArray alloc] init];
    }
    return self;
}

+ (instancetype)shareInstanse
{
    static dispatch_once_t one;
    static SDPhotoArray *instanse = nil;
    dispatch_once(&one, ^{
        instanse = [[self alloc] init];
    });
    return instanse;
}

- (void)addPhotoInfo:(SDPhotoInfo *)photoInfo
{
    [_photoInfoArray addObject:photoInfo];
}

- (void)addPhtoImage:(UIImage *)photoImage
{
    [_photoImageArray addObject:photoImage];
}

- (void)removeAllPhoto
{
    [_photoInfoArray removeAllObjects];
    [_photoImageArray removeAllObjects];
}

@end
